<?php
/**
 * 门店响应抽象类
 *
 * @author xiayuanjun@shopex.cn
 * @version 0.1
 *
 */
abstract class erpapi_store_response_abstract
{
    protected $__channelObj;

    public $__apilog;

    public function init(erpapi_channel_abstract $channel)
    {
        $this->__channelObj = $channel;

        return $this;
    }
    
    //xml字符串转数组
    function xmlToArray($xml){
        libxml_disable_entity_loader(true);
        $xmlstring = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);
        $arr = json_decode(json_encode($xmlstring),true);
        return $arr;
    }
    
}
